<template>
  <div>
    <div class="detail-header">
      <span>点餐</span>
      <span>评价</span>
      <span>商家</span>
    </div>
    <div class="detail-content">
      <div class="item-list-left">
        <div class="item-sellwell">
          <img class="item-sellwell-img" :src="src">
          <span>热销</span>
        </div>
        <div class="item" v-for="item of list" :key="item.id">
          <div class="item-title border-bottom">{{item.title}}</div>
        </div>
      </div>
      <div class="item-list-right">
        <div>
          <ul class="item-ul">
            <div class="item-dt">
              <span class="item-dt-descript">热销</span>
              <span>大家喜欢吃，才叫真好吃</span>
            </div>
            <li v-for="item of foodList" :key="item.id" class="item-li">
              <img :src="item.imgurl" class="item-img">
              <div class="item-characters">
                <span class="item-desc">{{item.desc}}</span>
                <span class="item-remarks">{{item.remarks}}</span>
                <span class="item-descript">
                  月售{{item.monthsale}}份
                  {{item.evaluate}}
                </span>
                <span class="item-money">{{item.money}}</span>
                <div class="iconfont item-add">&#xe60e;</div>
              </div>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailList",
  props: {
    list: Array,
    foodList: Array
  },
  data() {
    return {
      src:
        "//fuss10.elemecdn.com/0/6a/05b267f338acfeb8bd682d16e836dpng.png?imageMogr/format/webp/thumbnail/26x/"
    };
  }
};
</script>

<style lang="stylus" scoped>
.item-title-icon {
  position: relative
  left: 0.06rem
  top: 0.06rem
  display: inline-block
  width: 0.36rem
  height: 0.36rem
  background: url('http://s.qunarzz.com/piao/image/touch/sight/detail.png') 0 -0.45rem no-repeat; // s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.45rem no-repeat
  margin-right: 0.1rem
  background-size: 0.4rem 3rem
}

.detail-content {
  display: flex
  position :absolute
  flex-direction: row
  justify-content: space-between
  overflow :hidden
}

.item-title {
  line-height: 0.8rem;
  font-size: 0.3rem;
  padding: 0 .2rem;
  color: #666;
}

.item-sellwell {
  display: flex;
  flex-direction: row;
  padding-left: 0.2rem;
}

.item-sellwell-img {
  width: 15%;
  height: 15%;
  margin-right: 0.08rem;
}

.detail-header {
  display: flex;
  font-size: 0.45rem;
  justify-content: space-around;
  margin-top: 0.2rem;
}

.item-list-left {
  padding-top: 0.4rem;
}

.item{
  width :1.9rem
}

.item-list-right {
  z-left: 0.2rem;
}
.item-dt{
  margin-top :.2rem
  font-size :.24rem
  color :#999
}
.item-dt-descript{
  font-weight :bold
  font-size :.28rem
  padding-right :.1rem
  color :#333
}
.item-li {
  display: flex;
  margin-top: 0.2rem;
  flex-direction: row;
}

.item-desc {
  font-size: 0.34rem;
  color: #333;
  font-weight :bold
}

.item-img {
  width: 35%;
  height: 35%;
}

.item-add {
  position: absolute;
  margin-left: 2.5rem;
  margin-top: 1.4rem;
  font-size: 0.5rem;
  color: rgb(35, 149, 255);
}

.item-characters {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-left: 0.2rem;
  line-height: 0.5rem;
  font-size: 0.24rem;
  color: #999;
  flex: 1;
}

.item-descript {
  display: flex;
  flex-direction: row;
}

.item-money {
  position :absolute
  margin-top :1.5rem
  font-size: 0.32rem;
  color: rgb(255, 83, 57);
}
</style>
